home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12661 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  30 lines

  1. Newsgroups: comp.lang.c
  2. Path: news.inap.net!news1!ind-005-236-221
  3. From: dlmiller@iquest.net (Doug Miller)
  4. Subject: Re: How can I use huge || very small number?
  5. X-Nntp-Posting-Host: ind-005-236-221.iquest.net
  6. Message-ID: <Dp74E7.G6w@iquest.net>
  7. Sender: news@iquest.net (News Admin)
  8. Organization: IQuest Network Services
  9. X-Newsreader: News Xpress Version 1.0 Beta #2.1
  10. References: <315681F3.314D@blue.nowcom.co.kr> <4joh0l$jch@news.acns.nwu.edu>
  11. Date: Mon, 1 Apr 1996 18:25:09 GMT
  12.  
  13. muzaffar@casbah.acns.nwu.edu (Usman Muzaffar) wrote:
  14. >In article <315681F3.314D@blue.nowcom.co.kr>,
  15. >whoever  <whatever@blue.nowcom.co.kr> wrote:
  16. >>may be it is FAQ but...
  17. >>how can I compute 10000! or 0.12345......
  18. >
  19. >10000! is a very, very big number.
  20. >I'm not sure it's even representable by standard IEEE fp notation.
  21. >Any have that formula? 2*pi*e something or another.
  22. >
  23.  
  24. *Severely* off-topic, but since you asked for it...It's known as Stirling's Approximation.
  25. Reference: CRC Standard Mathematical Tables (12th Ed.), pg. 357.
  26.  
  27. n! = exp (-n) * pow (n,n) * sqrt ( 2 * pi * n) approximately.
  28.  
  29. And yes, that is a very very big number.  To a *very* rough approximation, 1E5000.
  30.